You can do this with a switch statement or if you have a lot (dozens or more) mappings, you could create a string data group with directory to pool mappings as name=value pairs and then use the class command to perform the lookup.
See the switch and class command pages for details: