Management Pane > tab Extend Field Behavior, column Lookup
If you use as the first field the ID, and the second field the string (e.g. name), then if the Source returns an ID, the value that is displayed in New Value, (and Old Value, if you are doing a replace) will be a string. In addition, the New Value combo box will show the strings returned by the query.
Now in the Old Value and New Value column names appear. Additionally, you can select another New Value from the combo box
In the Lookup field you can enter table or query names or SQL expressions:
From any query, table or SQL, Lookup will only concern itself with the first 2 fields:
If only 1 field is available, it will be both stored and displayed value.
The last SQL expression in the previous section shows the use of a WHERE-part and MatchId. The MatchId, in the example  tells the import processor to pick up the New Value of the row with MatchId 113.