To get the questions use the Ajax plugin to retrieve the questions from a PHP script which itself will query the mysql db using something like
SELECT question FROM questions ORDER BY RAND() LIMIT 1
which should get 1 random question, though your probably getting a lote more in one hit and returning a json array to populate an array or something.