This is how i accomplished what i needed (e.g. for a question with the options 1,2,3 and 4):
[...]
exten => s,3,Playback(custom/QA1)
exten => s,4,Read(QA1,beep,1,,3,5)
exten => s,5,SayDigits(${QA1})
exten => s,6,GotoIF($[ "${QA1}" = "1" | "${QA1}" = "2" | "${QA1}" = "3" | "${QA1}" = "4" ]?s,9:s,7)
exten => s,7,Playback(pbx-invalid)
exten => s,8,Goto(s,3)
exten => s,9,MYSQL(Connect connid 127.0.0.1 USER PASSWORD DB)
exten => s,10,MYSQL(Query r ${connid} Insert Into TABLE_NAME SET question_id='0', user_id='${CALLERID(num)}', result='${QA1}')
[...]