I have query which returns data in following format
QuestionID MaxPoints PointsAchived0 PointsAchieved1 PointsAchived2
Q1 2 208 102 100
Q2 1 218 192 N/A
Q3 1 190 220 N/A
Q4 2 50 120 240
Q5 2 20 270 120
i need output like
Label Q1 Q2 Q3 Q4 Q5
MaxPoints 2 1 1 2 2
PointsAchived0 208 218 190 50 20
PointsAchived1 102 192 220 120 270
PointsAchived2 100 N/A N/A 240 120
i have searched several topics all have aggregation function in the Pivot Syntax. how i achieve my requirement. also just to add questions count may vary depending on my conditions in query.
any help is appreciated.