Try this,
| eval main = case(isnotnull(test1), test1, isnotnull(test2), test2, isnotnull(test3), test3, isnotnull(test4), test4, 1=1 , "All Test Are Null")
Main's value should be test1 / test2 / test3 / test4 in-case test1 is empty option goes to test2, if test2 is empty then option goes to test 3 and test4 like wise.
If suppose test1, test2, test3, test4 contains value then test1 would be assigned to main. if not "All Test are Null" will be assigned to main.
Hope this will help you.
... View more