title: cakePHP - Join with conditional virtual field
body: <p>Is there a way I can generate this query with cakePHP : </p>
  
  <pre><code>SELECT pl.zban_player_id 'Player', pl.display_info 'GUID', pl.source_group 'Source',     
  IF(pv.variable_value is not null, 1,0) as  SyncProcessed
  FROM banner_key_current bkc
  INNER JOIN banner_key_current_ext bkce ON bkc.banner_key_id = bkce.banner_key_id
  INNER JOIN operations op ON op.operation_id = bkc.operation_id
  INNER JOIN players pl ON pl.zban_player_id = bkce.identifier
  INNER JOIN playermap_now pmn ON pmn.zban_player_id = pl.zban_player_id
  LEFT JOIN player_variables pv ON (pv.zban_player_id = pl.zban_player_id AND pv.variable_name = 'player_sync_processed')
  WHERE bkc.date BETWEEN '2014-05-01' AND '2014-11-13'
  AND op.category = 117
  AND pmn.user_id IN (1)
  Group By bkce.identifier
  </code></pre>
  
  <p>What I want to return is the alias field <code>SyncProcessed</code> based on the condition</p>
  
  <p>I'v tried using joins but couldn't get this result</p>