I have a table called results and the data looks like:
Response_ID order [part label] [Answer text] [Answer label]
124587 6 It was not clear NULL Yes
124587 6 Did not Understand Null Yes
124589 6 Other (Please specify): Not enough Yes
124563 1 NULL Satisfied? Yes
124583 11 Not frequent NULL Yes
125687 2 NULL Resolved? NO
I want Output as:
Response_ID [Part label]
124587 It was not clear,Did not Understand
124589 Not enough
124563 Yes
124583 Not frequent
125687 NO
The logic is whenever Order is 6 or 11 then I need to display the [Part Label] if the [Part Label] has multiple value for one Response_ID then I need to concatenate them but when the value of [Part Label] is Other (Please specify): then I need to use value from Answer Text column and if the order is not in 6,11 then I need to display the value from Answer label