Input Table VendorID Rahul Sourav Sunil
-------------------------------------
1 5 3 9
2 8 4 6
SELECT VendorID,EmployeeName,Orders
FROM tempCTE
UNPIVOT
(Orders FOR EmployeeName IN ([Rahul],[Sourav],[Sunil]) )AS unpvt
Output VendorID EmployeeName Orders
--------------------------------------
1 Rahul 5
1 Sourav 3
1 Sunil 9
2 Rahul 8
2 Sourav 4
2 Sunil1 6