Print CCK field "A" if CCK field "B" has a value of "Z"
THIMK! Test the value of Field B before printing Field A.

&lt;?php 
if(isset($node-&gt;field_field_b['und'][0]['value']) &amp;&amp; ($node-&gt;field_field_b['und'][0]['value'] == 'blue')) { 
    if(isset($node-&gt;field_field_a['und'][0]['value'])) {
          print $node-&gt;field_field_a['und'][0]['value'];
    }
  }
 ?&gt;