title: How do I hide column value if another field has a certain condition
body: <p>I have created a basic website that has a form. This form captures the following information from a user and stores it in the PHPMyAdmin table: </p>
  
  <p><strong>First Name, Surname, Title, Description, Email Address, Display Email Address (Yes/No).</strong></p>
  
  <p>An example of input would be: </p>
  
  <p><strong>David, Beckham, Mr, Hello I am a boy, david@hotmail.com, Yes</strong></p>
  
  <p>Also on the website, I have a table that shows a list of all the users stored in my database through the use of this PHP code:</p>
  
  <pre><code>$sql = "SELECT UserID, UserForeName, UserSurname, UserTitle, UserDescription, 
  UserEmailAddress FROM Users";
  </code></pre>
  
  <p>How would I edit this SQL so that if a user answers "No" to the "Display Email" field, their row would omit their email address from the row. For example:</p>
  
  <p><strong>David, Beckham, Mr, Hello I am a boy, david@hotmail.com, Yes</strong></p>
  
  <p><strong>Lucy, Sky, Mrs, Hello I am a girl,            , No</strong></p>
  
  <p>I have tried the following query, but have had no luck so far:</p>
  
  <pre><code>SELECT CASE WHEN EmailReveal = 'yes'
          THEN SELECT *
          ELSE SELECT UserID, UserForeName, UserSurname, UserTitle, UserDescription
     END AS col 
  FROM Users;
  </code></pre>