I have this table
custid visitid pagenum pagename
001 1 1 acceuil
001 1 2 produit
001 2 1 home
002 1 3 rayon
002 1 4 rayon
001 2 2 produit
003 1 1 home

I want to convert the above table in the following form:

custid visitid page1 page2 page3 page4
001 1 acceuil produit null null
001 2 home produit null null
002 1 null null rayon rayon
...