In short, it's totally possible and not too difficult. In fact, the hardest part would probably be getting enough questions.
What i would do is use $read(file.txt,n) to get a random question and set it to a variable. Depending on how the file questions and answers are formatted, you might have to parse the string.
The setting of the variable can be automated using a timer, which upon expiration, will free the variable. To prevent mistypes in chat, I would set an !answer * in order to answer the question.
If you have more specific requirements, I would be able to help you code it up.