In this case you are storing what appears to be relatively free form data, but you want to present as structured.
This can be done with a single query but only if you are sure of that your data will be in a certain form, i.e., aloways 1 colour and one size per product as shown in your data
SELECT CONCAT(IF(title='Sizes',CONCAT('Sizes: ', value),,''), (IF(title='Colours',CONCAT('Colours: ', value),,''))
FROM options WHERE
product = 1
Alternate WHERE clause to select all product options:
FROM options
GROUP BY product
HOWEVER: if there is only one color and size per product, then you should simply store that data in a column on the product table, as a single attribulte of product.
IF there are multiple size and color attributes of options, but every size has a color and every color has a size, it would better to make your option table with these columns:
table.option:
Produtt color size
1 red small
1 blue small
1 red large
1 blue large
etc.
Or 2 tables
table.ProductSizeOption
product size
1 small
1 large
2 small
2 medium
table.ProductColorOption
product color
1 red
1 blue
2 blue
2 green
etc.
Your current design is likely going to drive you nuts in the long run.
By the way, this sort of IF clause is most typically used to do a kind of pivot table of financial results.
SELECT SUM(IF(MONTH(timestamp)=1, amount,0)),SUM(IF(MONTH(timestamp)=21, amount,0))
FROM ledger