Fixed inputs / options to a pin (similar to a menu dropdown)

Say I have a set of pre-defined inputs that could be used for an input pin, such as the following list:

Available Baud Rates:
CAN_5KBPS, CAN_10KBPS, CAN_20KBPS, CAN_31K25BPS, CAN_33KBPS, CAN_40KBPS, CAN_50KBPS, CAN_80KBPS, CAN_83K3BPS, CAN_95KBPS, CAN_100KBPS, CAN_125KBPS, CAN_200KBPS, CAN_250KBPS, CAN_500KBPS, CAN_1000KBPS.

Is there any way / suggestions as to how an optional input could be used (kind of like using a dropdown menu with regular GUI coding)