I assume you mean that you are showing the UNIT LABEL for a control.
I'm not an expert on the units display, but it's my understanding that when you choose units, you choose units, and that's what you get. The control (or indicator) does NOT interpret the number and decide that it's kilometers intstead of meters.
Such logic would be impractical in the general case, although you might have specific rules to apply.
What happens if the number is 990 meters, and I'm showing two decimal places? I might want to see 990.00 meters, and someone else might want to see 0.99 kilometers. There's no way to make that work in the general case, so it's not done at all.
What happens if the number is 1010 meters, and I'm showing two decimal places? I mi
ght want to see 1010.00 meters, and someone else might want to see 1.01 kilometers.
If you want such rules to apply, you'll have to implement the logic yourself.