I am looking to design a piece of survey software in C# that asks questions and based on the response would determine which question is asked next.
The questions would have a selection of 2 or more options. Based on the option selected would determine the path to the next question
So for example assume questions are numbered 1 -> 5, each would have 2 or more options (a,b,c). Depending on the option selected next numerical question could be skipped, so if option (a) was selected for each question the questions might flow numerically, if (b) selected the numerically the following question could be skipped. For example where the number is the question and the letter the selected answer:
1(a), 2(a), 3(b), 5(a),6(c),8(b) and so on
I wondered if there is an applicable design pattern/sensible data structure that would show me a good place to start. I don’t know how to design a data structure that would enable me to link questions in this manner
I am hoping to avoid writing something procedural with extensive conditional statements, I have no fixed requirements regarding how the answers/questions/content should be stored so any advice around whether relational or document based would be much appreciated.