How to write a case statement that returns a dimension

I am trying to write a formula in a blended data set that is going to return the visitor source. The problem is since the visitor sources from the two different data sets dont exactly match, so they return null if it’s not exact match.

Case 
when Visitor Source (Table 1)="null" then Visitor Source (Table 2)
when Visitor Source (Table 2)="null" then Visitor Source (Table 1)
when Visitor Source (Table 1) does not CONTAINS_TEXT("null") then Visitor Source (Table 1)
when Visitor Source (Table 2) does not CONTAINS_TEXT("null") then Visitor Source (Table 2)
END

This was my idea to create a new dimension that rewrites the null values to the value of the source of the other column, but obviously I don’t know how to write the formula. 

0 1 467
1 REPLY 1