You're looking at the $read identifier with its -s switch:
on *:TEXT:!faq *:#MY_CHAN:{
if ($read(file.txt,s,$2)) {
msg # $v1
}
}
So in your text file, you have the question set up as:
Question1 Here is the answer for Q1
Question2 Here is the answer for Q2
Question3 Here is the answer for Q3
Once a user enters
The code will scan that particular line and output
Here is the answer for Q1
And so on and so forth.