Conditional Resource Block Execution Method

I would required some conditional approach to deploy a set of resource block .

Assume i’ve 3 resource block , and the resource type is same (Assume its azurevm resource block) . Based about the varibale information one of these 3 resource need to be excuted ,like a switch in the functional programming .

When user input var.option value ==1/‘string’ then , 1st resource block needs to be excuted , rest should be ignored
When user input var.option value==2/‘string’ then , 2nd resource block needs to be excuted , 3rd and 1st should be ignored
When user input var.option ==3/‘string’ then , 3rd resource block needs to be excuted , 2nd and 1st should be ignored.

How do we write code for this approach . using count , We can use true/false condition.
How do we write for three conditions ?