Well you can do it with an if-else-if chain but... yuck.
If we can ditch the variables and do some restructuring*:
latestValueMap.put(key, getLatestData().getValue(key));
previousValueMap.put(key, getPreviousData().getValue(key));
* Assumes a, p, and t values are all of the same type. A detail not made clear in the question.
This allows you to control moving the information the same way, with the key. It’s held differently but it’s all still there.
The advantage is that it’s now simpler to introduce new keyskey values since knowledge of key values is isolated. Something the switch can’t do for you.