SELECT 
 * 
 
FROM 
 `lead` 
 
WHERE  
  IF( :state<>'', `state` = :state, true )
 AND 
  IF( :shape<>'', `shape` = :shape, true )
 AND 
  IF( :email<>'', `email` = :email, true )
  
LIMIT 
 1 
 
OFFSET 
 0
 
