table1
id value
2 20
3 30
4 40
5 50
6 60
7 null
the above table has to be inserted into another table2 with following fashion
i,e: it has to insert the value corresponding to 2 into col1 when id =2 ,col2 when id=3 and so on. note: insert empty when null is the value
table2
col1 col2 col3 col4 col5 col6
20 30 40 50 60 empty