Defining multiple struct typedefs and using based on version number

How could I implement a template structure such that I would have let’s say 3 different typedefs for the struct, version1, version2 and version3. The structures all contain a member at the same offset called “version”. Based on the value of this version, how would the template be able to display the correct typedef for this structure?

I’m using this for the header of a binary file to define how the rest of the data in the file will be displayed.