Sitecore provides you the possibility to implement your own layout resolver if the default one is not enough for you. Basically you can change the layout of a page based on a business logic without changing the item in the database.
If you can’t see the code snippets click here to switch to non-AMP mode!
How to do it?
If you are using Sitecore MVC (I hope you are using) you need to inject the following processors in the following pipelines:
The first processor is changing the file path of the
.cshtml but unfortunately it is not enough.
You also need to change the layout of the context item to point to the new layout item in Sitecore.
After injecting these 2 processors you should able to change the layout of the context item in the current request. The implementation has been tested on Sitecore 8.2 update 7.