The drop-down list cell will always show the value you selected, but you can look up the ID in a nearby cell with something like this:
=iferror( vlookup(D2, { DropdownLists!B2:B, DropdownLists!A2:A }, 2, false) )
...where D2
is the drop-down list cell and DropdownLists!A2:B
is the range where you have the IDs and names.