This blog post will walk you through some of the new capabilities we have in our template language expressions for Azure Resource Manager templates.
A common ask from customers is, “how can we use conditions in our ARM templates, so if a user selects parameter A, then resource A is created. If not, resource B should be created?”. The only way you could achieve this, would be by using nested templates and have a mainTemplate to manipulate the deployment graph.

Learn more about it in the Azure blog.