Q:

Case statement won't return a value when one select query doesn't populate

I tried asking this before with more specific queries, but I want to break it down with a very simple theoretical query to ask why. 
When the second table t2 doesn't populate due to a where condition, then the case statement breaks down. 
Assume that tblA only has one row
This will work: returns 1
DECLARE @numA int SET @numA=1
DECLARE @numB int SET @numB=1
DECLARE @numC int SET @numC=2

SELECT
    CASE WHEN(t1.v1=1 or t2.v2=1)
    THEN 1
    ELSE 0
    END AS Test1
FROM
   (SELECT 1 as v1
   FROM tblA
   WHERE @numA=@numB) t1,
   (SELECT 0 as v2
   FROM tblA
   WHERE @numA<>@numC) t2

This will not work because t2 won't populate:
DECLARE @numA int SET @numA=1
DECLARE @numB int SET @numB=1
DECLARE @numC int SET @numC=2

SELECT
    CASE WHEN(t1.v1=1 or t2.v2=1)
    THEN 1
    ELSE 0
    END AS Test1
FROM
   (SELECT 1 as v1
   FROM tblA
   WHERE @numA=@numB) t1,
   (SELECT 0 as v2
   FROM tblA
   WHERE @numA=@numC) t2

How can I make this work!? Thanks guys, I've tried 

A:

You have a cross join where one side returns 0 rows. This returns 0 rows when combined, too. Consider this:
SELECT a = 1 WHERE 1 = 1;

Results:
a
----
1

Now consider the case where the result returns 0 rows:
SELECT a = 1 WHERE 1 = 2;

Results:
a
----

Now, cross join them, either implicitly:
SELECT * FROM
(SELECT a = 1 WHERE 1 = 1) AS t1,
(SELECT a = 1 WHERE 1 = 2) AS t2;

Or explicitly:
SELECT * FROM
(SELECT a = 1 WHERE 1 = 1) AS t1
CROSS JOIN 
(SELECT a = 2 WHERE 1 = 2) AS t2;

In both cases, you get zero rows, because the concept of a cross join is "take every row from one side, and produce a row for every row on the other side." Since there are no rows on one side, there are no rows, period. This is like multiplying any number * 0. Doesn't matter if the source is 1 or 50 or 6000, that number times zero is still zero. So take it a step further:
SELECT a = CASE WHEN t1.a = 1 THEN 1 ELSE 0 END 
FROM
(SELECT a = 1 WHERE 1 = 1) AS t1
CROSS JOIN 
(SELECT a = 2 WHERE 1 = 2) AS t2;

This still yields 0 rows, so there is nothing to produce from the CASE expression. Perhaps what you meant was something like this:
SELECT a = CASE WHEN t1.a = 1 OR t2.a = 1 THEN 1 ELSE 0 END FROM
(SELECT a = 1 WHERE 1 = 1) AS t1
FULL OUTER JOIN 
(SELECT a = 2 WHERE 1 = 2) AS t2
ON 1 = 1;

However, I have to agree with the comments. Instead of making up nonsense queries to try to understand behavior, why don't you let us teach you how to solve the real problem you're trying to solve?

