title: SQL to display a column value as a set value or null depending on status
body: <p>below is the code I have written - what I want is when the status is equal to 'N' to display 'Export to WMS' in the column 'Export to WMS'. </p>
  
  <p>If it has any other value than 'N' in the status, I want the column to still appear because some results will be at status 'N' but for those that aren't I want the value of that column to be blank.</p>
  
  <pre><code>select 
       m.display_order_number, m.record_create_date, l.lookup_description,m.wh_id, 
       m.client_code,m.order_type,m.order_date,m.UIN, m.ship_to_name,m.carrier,
       (select DISTINCT 'Export to WMS' 
       from 
       t_3pl_order_master 
       where 
       status = 'N') AS "Export to WMS"
  from 
       t_3pl_order_master m
  INNER JOIN 
       t_3pl_lookup l on m.status = l.lookup_value AND l.lookup_type = 'Order Status';
  </code></pre>
  
  <p>Results I get are: 
  <a href="https://i.stack.imgur.com/O42pS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/O42pS.png" alt="enter image description here"></a></p>
  
  <p>Where you can clearly see when the status is 'W' it still displays 'Export to WMS' but ideally I would want that to be blank and those with status 'N' to display 'Export to WMS'.</p>
  
  <p>Hope you can help!</p>