I get the feeling you still don't understand the difference between client and server side code. Here is the logic of how it will have to work...
When the user goes to the web site, the server get's the riddle from the database, sends it to the user along with all the other client side code such as html and javascript. that is no longer connected to the server and is sent to the user formed to make the web page that everyone see's. Now they're looking at a web page with a riddle on it. You have a form/text box waiting for their answer...they enter it into the text box and hit the submit button. The web page sends the user's answer back from their machine to the server...the server then compares their answer to the answer you have in the database...depending on whether it matches or not, it'll perform the action you want it to based on the outcome of the conditional statement you made on the server side code (ASP).
Then, you can redirect them to another page, or send back the same page again...send them somthing like: "Your answer was correct" or somthing back along with the html and javascript, or xml, or what-have-you which will be the client side code because it's not connected to the server...it has already been sent to the user/client and has nothing to do with the server again until the user/client resends the page again or refreshes it, or whatever.
Does that clarify it a little?
-Ovatvvon :-Q