title: yii2 multiple sort using order case for default order in ActiveDataProvider
body: <p>I'm creating a website using Yii2 and I would like to sort with multiple field like this:</p>
  
  <pre><code>SELECT * FROM tbl_product t
  ORDER BY
  CASE
      WHEN t.product_sale_price IS NULL THEN t.product_price
      ELSE t.product_sale_price
  END
  </code></pre>
  
  <p>with query above, this set of data:</p>
  
  <pre><code>Product | product_price | product_sale_price
  --------|---------------|-------------------
  Prod A  | 2000          | 1200
  Prod B  | 1500          | NULL
  Prod C  | 1800          | NULL
  Prod D  | 1000          | 500
  </code></pre>
  
  <p>will become:</p>
  
  <pre><code>Product | product_price | product_sale_price
  --------|---------------|-------------------
  Prod D  | 1000          | 500
  Prod A  | 2000          | 1200
  Prod B  | 1500          | NULL
  Prod C  | 1800          | NULL
  </code></pre>
  
  <p>How can we put it in defaultOrder of ActiveDataProvider? I tried:</p>
  
  <pre><code>return new ActiveDataProvider([
      'sort' =&gt; [
          'defaultOrder' =&gt; ['product_sale_price' =&gt; SORT_ASC, 'product_price' =&gt; SORT_ASC],
          'enableMultiSort' =&gt; true,
      ],
  ]);
  
  return new ActiveDataProvider([
      'sort' =&gt; [
          'defaultOrder' =&gt; '(CASE WHEN product_sale_price IS NULL THEN product_price ELSE product_sale_price END ASC)',
      ],
  ]);
  </code></pre>
  
  <p>Both didn't work. How sholud I do it?</p>