One single view with multiple forms

The Situation:

I want to have a single form with multiple task options and the questions to change in the form accordingly. For ex- If X chooses task Y then the questions in the form should be related to task Y. Similarly if X chooses task A, then questions should change based on the task picked.

Having multiple forms/tabs for these tasks is not helping much. I know I can have different task options when I choose “multiple select” but the changing of questions is my need.