Case expression in a un-pivot scenario
I'm trying to un-pivot a query set as below
Member ID N1code N2code N3code Name
1234 234 567 878 ted
23344 4242 23232 Mike
I want a case expression of some kind that helps show the type after unpivoting
MemberID Codes Name Type
1234 234 ted N1
1234 567 ted N2
1234 878 ted N3
23344 4242 Mike N1
23344 23232 Mike N2