Much depends on how you've structured your database, but essentially, you'll need to create or find one record for each label. These records can exist in a temporary table used just for printing labels so as not to affect your data in other parts of your system.
Say your "order" records look like this:
Where 234 is the Item Id for "Red box, Size S", 235 = "Red box, size M" and 236 = "Red box, size L"
You can use the Qty fields to determine how many records to create in your label table and use the ItemID value and a relationship to link it to specific fields in a related table to display the text you want.