title: How to add Where condition on Virtual column in Typeorm
body: <p>Can someone help me in below query I always get x.salesChannel as Unknown column</p>
  <pre><code>SELECT Column1,
      Column2,
      (
          SELECT CASE
                  WHEN `cr`.`CRColumn` is not null
                  AND `cr`.`CRColumn` &lt;= `ca`.`caColumn` THEN `cr`.`CRColumn`
                  WHEN `cr`.`CRColumn` is not null
                  AND `cr`.`CRColumn` &gt; `ca`.`caColumn` THEN `cr`.`CRColumn`
                  WHEN `cr`.`CRColumn` is not null
                  AND `cr`.`CRColumn` is null THEN `cr`.`CRColumn`
              END as salesChannel
          FROM `table1` `ca`
              LEFT JOIN `Table2` `bc` ON `bc`.`contract_action_id` = `contract`.`id`
              LEFT JOIN `Table3` `cr` ON `cr`.`pnr` = `bc`.`pnr`
      ) AS `x`
  FROM `table1` `contract`
  WHERE `contract`.`type` = ?
      AND x.salesChannel IS NOT NULL
      AND x.salesChannel IN (?, ?)
  </code></pre>