Setting the checked property of a grouped radio button

I have 3 radio buttons in a group. I want to be able to set the checked property of any one of the radio buttons based on data returned from a table in a database. How do I achieve this? I have tried without success.
afaik it's just setting the variable to the right value of the radio-buttons.

Yes, setting the variable in the preperation will do it, but if you want it triggered by an Ajax Submit, you need to add an Ajax Refresh as well.