Do you want to include a custom template when some condition is true? Say no more, there is an filter hook called template_include.
It is really simple, call the filter hook, check if the condition is true and return the full path to the new template file.