Use the CASE expression:
SELECT CASE WHEN Column IS NULL AND ID = X THEN Column1 ELSE Column2 END FROM yourTable;
You have forgotten to tell us for which DBMS (SQL Server , ORACLE, ACCESS). The version and edition could be also usefull
For SQL Server :
- test if a column is null ==> ISNULL http://msdn.microsoft.com/en-us/library/ms184325(SQL.100).aspx ( for SQL Server 2008 valid from 2005 )
have a look at http://msdn.microsoft.com/en-us/library/ms191270(SQL.100).aspx ( a comparaisn to null is not evident to understand )
- for AND operator : http://msdn.microsoft.com/en-us/library/ms189119(SQL.100).aspx
Please, could you provide the definition of your table and explain "Other Condition Like" ?
LIKE is existing in TRANSACT-SQL ( pattern matching in search ) http://msdn.microsoft.com/en-us/library/ms187489(SQL.100).aspx
Don't hesitate to post again for more help or explaination
Have a nice day
PS : if your thread is related to SQL Server , it is possible that a moderator moves your thread towards the Transact-SQL forum where it will interest more people ( this forum is mainly for connection or protocols problems )
Mark Post as helpful if it provides any help.Otherwise,leave it as it is.