If you really want to execute code stored in a database, a quick google search reveals that you can use the eval() function to do just that. However, many people do say that Eval is Evil...
Instead of storing the entire PHP code of an option in the database, try storing a simple boolean flag for your option and then test whether to get your template's option data from there:
// Somewhere else in your code, store the settings option upon saving settings
update_option( 'my_setting_for_template', 1 );
// Test if get_option returns 1 from the database
if( get_option( 'my_setting_for_template' ) === 1 )
echo get_option('profiles_templates_html'. $template .'');