title: How to create multiple 'THEN' clauses for a BigQuery standard SQL case statement?
body: <p>I'm using standard SQL on BigQuery to create a new table based on certain conditions within an existing table. I have multiple WHEN clauses to support this (as there are several different conditions I'm checking for). What I now want to do is have multiple THEN clauses within those WHEN statements, as I'm aiming to add more than one column. </p>
  
  <p>Specifically, I want to add a concatenation of two existing text fields as one field, and then an aggregated array of three existing fields as one field:</p>
  
  <pre><code>CASE WHEN
      # all three match
      one_x1 = two_x1 = three_x1 THEN CONCAT( object1_name, ", ", object2_name, ", ", object3_name ) AND ARRAY_AGG(STRUCT(score_one, score_two, score_three))
      # one and two match
        WHEN one_x1 = two_x1 THEN CONCAT( object1_name, ", ", object2_name ) AND ARRAY_AGG(STRUCT(score_one, score_two))
      # one and three match
        WHEN one_x1 = three_x1 THEN CONCAT( object1_name, ", ", object3_name ) AND ARRAY_AGG(STRUCT(score_one, score_three))
      # two and three match
        WHEN two_x1 = three_x1 THEN CONCAT( object2_name, ", ", object3_name ) AND ARRAY_AGG(STRUCT(score_two, score_three))
     ELSE
      NULL
   END
  </code></pre>
  
  <p>It is the 'AND ARRAY_AGG(STRUCT(xxxxx))' part that does not work, I have also tried using commas to separate the THEN clauses.</p>
  
  <p>Is the only option to repeat the same case statement to separate the THEN clauses individually?</p>
  
  <p>Sample data:
  <a href="https://i.stack.imgur.com/KsI6K.png" rel="nofollow noreferrer">sample_data</a>
  desired outcome for row 1 of sample data:
  <a href="https://i.stack.imgur.com/lNZDN.png" rel="nofollow noreferrer">here</a></p>