Select values from a row

Hi everyone, Im working on a medical diagnosis app that generate a conclusion depending on the answers of a form.
I set 2 tables, in table “Questions” I have the pacient information and questions in each header. Every form I take to a new pacient is a new row.
In table “Answers” I have posible answers to each question and a comment asociated to that answer that should be printed in the conclusion.

Table Answers goes like this:

So, each question column in table “Questions” is in enum type with ref basetype that shows the answers referenced by the question number.
3X_4_b_4b94bed48133ea233ffed8d6cbba59179d2010ff.png

I want to create a summary column in Question table that shows the summary comments of each question depending on them answers.

I was thinking on three virtual columns that select for each pacient the question that were “Yes”, “No” and “With difficulties”, but I dont know if I can select different column values from the same row.

Ideas in how can I go on with this one are welcome.

Thanks in advance

0 1 112
1 REPLY 1

This is a bit confusing, but I think this article will hopefully steer you in a good direction.

Top Labels in this Space