SQL query to return result with different row I am working with a database that has a table called 'order' that looks like the following. 

id    day    item  
-------------------
11     1     apple    
11     3     banana  
11     4     berry  
22     1     coke  
22     3     pepsi  
33     2     chips  
33     4     salsa  


I want mysql query output to look like the following:

id    1       2       3       4
------------------------------------
11    apple   null    banana   berry  
22    coke    null    pepsi    null  
33    null    chips   null     salsa  


Is it possible to get such an output using mysql?
SELECT id,
       MAX(CASE WHEN `day` = 1 THEN item END) day_1,
       MAX(CASE WHEN `day` = 2 THEN item END) day_2,
       MAX(CASE WHEN `day` = 3 THEN item END) day_3,
       MAX(CASE WHEN `day` = 4 THEN item END) day_4
FROM source_table
GROUP BY id