Overwhelmed noob here. I would appreciate any help. I am have been working on this for several days and am cracking.
I have two tables, questions and results:
Table - questions:
ID |questions |ans1 |ans2 |ans3 |ans4
-----|---------------------|---------|---------|---------|---------
1 | Favorite color: |red |blue |green |purple
2 | Favorite animal: |cat |dog |snake |bird
3 | Favorite food: |pizza |hotdog |chicken |salad
Table - results:
ID |user_id |ques1 |ques2 |ques3
-----|-----------|-------|-------|-----
122 |abc123 | 1 | 3 | 4
123 |xyz987 | 3 | 3 | 1
124 |ghj567 | 4 | 1 | 1
Desired output table for user_id abc123:
ques|question |ques_value|response
1 |Favorite color: | 1 | red
2 |Favorite animal: | 3 | snake
3 |Favorite food: | 4 | salad
Changing the structures of the tables is not an option.
Please help!!