microswitches
If you can arrange the switches so that one, and only one, switch is closed for each gear ratio then you can do it like this.
Resistor in series with each segment, exact value dependent on the brightness you want. Maybe the smaller segments need a slightly higher resistor value than the others to get the brightness the same?
Diodes to each switch contact, one per segment that you want that switch to light up
This could be built nicely on a large piece of stripboard.
A common-cathode display could be used with the diode direction reversed and the power connections the other way around.
This seems like a good way for a beginner to build it. It could be made physically smaller with a 40 pin microcontroller instead of about three dozen diodes.
Don't forget a suitable fuse close to the source of the electrical power for the display. It should be at the source end of the power cable so it will blow if something happens to the cable. (I assume this is a modern negative earth car so you put the fuse in the positive lead)
Usual disclaimers apply, do not attempt any modifications to your vehicle unless you are competent to do so safely.