Set template based on query in URL

There are a number of template filters available to override template selection. For a single post you can use the single_template filter:

function wpa_single_template( $template ) {
     if( isset( $_GET['template'] ) ) {
          $template = locate_template( $_GET['template'] . '.php', false );
     }
     return $template;
}
add_filter( 'single_template', 'wpa_single_template' );