Case when returning null row
<p>Below are my tables:</p>

<pre><code>T1:
ID 
1
2
3

T2:
ID (fk) value
1        Apple
1        Chocolate
2        Carrot
2        Chocolate
3        Candy
3        Chocolate
</code></pre>

<p>In my query:</p>

<pre><code>select t1.id,
case when (t2.a) like 'app%'
  then 'Apple'
end as 'Fruits',
case when (t2.a) like 'car%'
  then 'Carrot'
end as 'Veggies'
from t1, t2
where t1.id = t2.id
</code></pre>

<p>here is how my output is:</p>

<pre><code>id  Fruits  Veggies
=====================
1   Apple
1
2            Carrot
2
3
</code></pre>

<p>I see that in the output, I get two rows, one with a match 'fruit'/'veggie' and one with <code>null</code>. 
Why is the query returning a null row as well? 
Sorry if my example is not that great. Basically I am trying to create 2 more columns with some text identifiers.</p>

<p>I am expecting an output like:</p>

<pre><code>id  Fruits  Veggies
    =====================
 1   Apple
 2            Carrot
 3 
</code></pre>

<p>EDIT:
I have added the table structure above and updated the query with from and where clauses. After implementing the condition in the where clause, I realized the IDs without Apple or Carrot like #3 will not be returned at all if I have the said condition in the where clause. </p>