SQL Server: How can I select all result of table when condition is FALSE?
<p>I got a trouble in stored procedure:</p>

<pre><code>SELECT * FROM TESTTABLE
WHERE COUNT = CASE WHEN (@count = -1) THEN --SELECT ALL RESULT OF TESTTABLE--
ELSE @count END
</code></pre>

<p>When param @count is not equal -1, I want that query is the same with:</p>

<pre><code>SELECT * FROM TESTTABLE
</code></pre>

<p>I tried with </p>

<pre><code>SELECT * FROM TESTTABLE
WHERE COUNT = CASE WHEN (@count &lt;&gt; -1) THEN @count END
</code></pre>

<p>But it's not true.</p>