Syntax: If expr1 contains a NULL value, then return expr3.If the value of expr1 contains a non-NULL value, then return expr2.
Also, if you feel that I have answered your question, please mark it as an answer.
I have a (SQL Server) table that contains 3 types of results: FLOAT, NVARCHAR(30), or DATETIME (3 separate columns).
I want to ensure that for any given row, only one column has a result and the other columns are NULL.
Constraints introduce basic data type checking, and thus allow for a good range of validation and integrity-checking techniques.
UNIQUE constraints and CHECK constraints are two types of constraints that can be used to enforce data integrity in SQL Server tables. For example, you can use UNIQUE constraints to make sure that no duplicate values are entered in specific columns that do not participate in a primary key.