I want to use case statements in sql server 2008 using case or if else statements in the code below Any help would be greatly appreciated.
SELECT [Ip Pop].[Appl Id], [Ip Pop].[Account Number], [Ip Pop].[Rel Type Desc], [Ip Pop].[Relationship Desc]
FROM [Ip Pop]
if (Instr (Relationship Desc,'Trust', 0, 1)
||(Instr (Relationship Desc,'UTMA', 0, 1)
||(Instr (Relationship Desc,'Estate', 0, 1)
||(Instr (Relationship Desc,'Exect', 0, 1)
||(Instr (Relationship Desc,'Escrow', 0, 1)
||(Instr (Relationship Desc,'IOLTA', 0, 1)
||(Instr (Relationship Desc,'Tenant', 0, 1)) {"TUA"}
elseif|(Instr (Relationship Desc,'Joint', 0, 1)) {'JOD'}
elseif|(Instr (Relationship Desc,'Primary', 0, 1)
||(Instr (Relationship Desc,'Minor', 0, 1)
||(Instr (Relationship Desc,'Sole', 0, 1)
||(Instr (Relationship Desc,'HSI', 0, 1){"IND"}
elseif(Instr (Relationship Desc,'Corp', 0, 1)
||(Instr (Relationship Desc,'Part', 0, 1)
||(Instr (Relationship Desc,'Busi', 0, 1)
||(Instr (Relationship Desc,'Comp', 0, 1)
||(Instr (Relationship Desc,'DBA', 0, 1)
||(Instr (Relationship Desc,'Nonp', 0, 1)
||(Instr (Relationship Desc,'Limited', 0, 1)
||(Instr (Relationship Desc,'Non-P', 0, 1)
||(Instr (Relationship Desc,'Club', 0, 1){"COA"}
elseif(Instr (Relationship Desc,'Cust', 0, 1)){"CSA"}
elseif(Instr (Relationship Desc,"IRA", 0, 1)){"IRA"}
else{""}