Database structure for hierarchical quiz?
In relational database, you should create a table called Questions which should contain following fields:


ID
QuestionString
QuestionType (Master, Individual, sub-question)
TrueCase (here you should store the ID of the next question. Since
we'll store all questions in this table, therefore each questions
shall have unique ID)
FalseCase (ID of the question to ask if answer is not correct. If ID
is null, then you should exit)


Hope it helps.