I am struggling to come up with what this would be called, but it feels like there is almost certainly a word/phrase for it. For example, let's say we have a survey and the first question is a yes or no type question. Answering yes may lead to just one more question, while answering no would lead to two more questions, one of which being another yes or no type question, the other wanting some sort of other answer that the survey taker can fill in. If the second yes is taken, the survey is complete, but if the second no is taken, even more questions could be asked until the survey reaches its final question.
Is there a name for the yes or no questions that essentially direct the survey taker down whichever path makes sense for the survey taker given their input?
Edit: I should also note that there are not always two possible answers, although my example only included two answer questions. Another possible "answer set" could be less than, the same as, greater than, for some question asking about frequency of something happening.