A modeling/Design question

Wondering how some of the gurus here would handle this situation.

I have a system of Templates and TemplateItems. A template is a collection of TemplateItems.

When a user fills out my form, I grab all the templateItems that the form requires and render them. Right now the ‘data’ that I collect is in the form of a radio button, boolean yes/no.

I want to extend this functionality to allow the user the ability to choose between collecting boolean values (radio) versus a simple plain text input field. Its analagous to creating a survey creation tool where the user should be able to define the ‘Type’ of question that is being asked.

I also want to be able to give the user the ability to create a ‘header’ item that will be for presentation only. It would be used to group sets of TemplateItems on a Template.

The only immediate thing that comes to mind is to add a ‘type’ field to TemplateItem:

type varchar (would represent boolean, header, textfield, etc)

In the table that stores the result I would therefore need a way to store boolean vs. textfield values. I can only think of having fields for each ‘Type’ as described above and allow them to be null.

Is there a better way? I tried to goggle this but I am not sure what terms to even search for!