Is it possible to add PHP code in Global: Custom Text?
First, install the Views PHP module and you can now add a "Global: PHP field" to your views that can include PHP code.

Then add your condition field first in your view and after that your PHP field, so that the condition field value is included in available tokens.

The code of your PHP field should be sth like this:

  &lt;?php    
      if ($field_test) { // use the field token here and check if empty
       return '&lt;a href="$url1"&gt;Exists&lt;/a&gt;'; 
      } else { 
       return '&lt;a href="$url2"&gt;Not exists&lt;/a&gt;'; 
      }  
   ?&gt;


See also:

How can I enable Global: PHP field

add Global PHP code field to Views on condition