 <p>The most sargable option, short of using dynamic SQL, is to use an IF statement and two queries:</p> <pre><code>IF LEN(@Title) &gt; 0 SELECT r.* FROM RECORDS r WHERE r.title LIKE '%'+ @Title +'%' ELSE SELECT r.* FROM RECORDS r </code></pre> <p>The SQL Server 2005+ dynamic SQL version would resemble:</p> <pre><code>DECLARE @SQL NVARCHAR(4000) SET @SQL = 'SELECT r.* FROM RECORDS r WHERE 1 = 1' --will be optimized out, easier to add clauses SET @SQL = @SQL + CASE LEN(@Title) WHEN 0 THEN '' ELSE ' AND r.name LIKE ''%''+ @Title +''%'' ' END BEGIN EXEC sp_executesql @SQL, N'@Title VARCHAR(#)', @Title END </code></pre> <p>Unlike <code>EXEC</code>, <code>sp_executesql</code> will cache the query plan. You can read more about it in <a href="http://www.sommarskog.se/dynamic_sql.html" rel="nofollow noreferrer">the Blessing &amp; Curse of Dynamic SQL</a>.</p>