The general logic will be:
load Key(s), FurtherFields from QVD;
load Key(s), ExtraFields from OtherSource;
load *, CreateNewField resident t1;
drop tables t1;
whereby you need to use an if-loop with your conditions instead of a case-statement.
Alternative would be to load your ExtraFields at first within a mapping table and than using applymap() to access these values within your qvd-load: Mapping as an Alternative to Joining.