SQL query to return result with different row
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