Table:
ID VT_Type1 Vt_type2 VT_Type3 Status_1 Status_2 Status_3 Date_1 Date_2 Date_3
1 -1 -1 0 X Y Z 04/12 05/12 06/12
2 -1 -1 -1 A B C 06/12 07/12 07/10
Expected output
Id Type Status Date
1 1 X 04/12
1 2 Y 05/12
2 1 A 06/12
2 2 B 07/12
2 3 C 07/10
If type has -1 then corresponding status and date column should be retrieved as a row. As seen in above example ID 1 type1 has -1 and type2 has -1, so those 2 has to be converted in to 2 rows, type 3 has 0, so not to be considered. When i see examples online, i see case to be used but not sure how to use to service my need.
null- and if so, should it be "considered" or ignored?