Case when exists in where clause sql server example multiple. SQL Server Cursor Example.