Set up a union. If you don't know what that is, it's basically a structure that can store only one variable. However, this variable's type is flexible, based on how you define the union. Here's an example for your case...
The thing about unions is that you can only ever access one of its variables. Once you access one of them, you can't access any of the others. Now that we have the union set up, we can declare a building variable.
typdef union MyUnion
Use the user's input to decide which one of the variables you need to access.