This is certainly doable and very flexible on the approach. You could record the answers to some variables using the read command in dialplan. Then call a script in your preferred programming language to write the variables to a database via AGI. We do this a lot for various applications.
Another option is to have the results mailed to you realtime. @dickson has built a few of these in the past. Here is an example.
You’ll need to do some reading and tinkering to figure things out yourself, or hire someone to develop it for you.