SELECT id1, id2, year, 1 as month, quantity01 as quantity, price01 as price FROM old_table
UNION ALL
SELECT id1, id2, year, 2 as month, quantity02 as quantity, price02 as price FROM old_table
UNION ALL
SELECT id1, id2, year, 3 as month, quantity03 as quantity, price03 as price FROM old_table
UNION ALL
SELECT id1, id2, year, 4 as month, quantity04 as quantity, price04 as price FROM old_table
UNION ALL
SELECT id1, id2, year, 5 as month, quantity05 as quantity, price05 as price FROM old_table
UNION ALL
SELECT id1, id2, year, 6 as month, quantity06 as quantity, price06 as price FROM old_table
UNION ALL
SELECT id1, id2, year, 7 as month, quantity07 as quantity, price07 as price FROM old_table
UNION ALL
SELECT id1, id2, year, 8 as month, quantity08 as quantity, price08 as price FROM old_table
UNION ALL
SELECT id1, id2, year, 9 as month, quantity09 as quantity, price09 as price FROM old_table
UNION ALL
SELECT id1, id2, year, 10 as month, quantity010 as quantity, price010 as price FROM old_table
UNION ALL
SELECT id1, id2, year, 11 as month, quantity011 as quantity, price011 as price FROM old_table
UNION ALL
SELECT id1, id2, year, 12 as month, quantity012 as quantity, price012 as price FROM old_table
;