I want to create multiple if else statement inside the case of sql server.
Is it possible then please provide me one example.
In c# you can write the multi line statement inside the case.

Is it possible in SQL Server like C# switch case.

I want to put below code in case loop

```
IF @SegmentId > 0 and @AttributeName IS NOT NULL   
begin
  select AttributeID,Attribute_key from AttributeMaster 
  where AttributeTypeId =@AttributeType and SegmentId=@SegmentId 
  and Attribute_key   like '%'+@AttributeName+'%' order by AttributeID
end

else IF @SegmentId = 0 and NULLIF(@AttributeName, '') IS NULL   
begin
  select AttributeID,Attribute_key from AttributeMaster 
  where AttributeTypeId =@AttributeType  order by AttributeID
end

else IF @SegmentId > 0 and NULLIF(@AttributeName, '') IS NULL   
begin
  select AttributeID,Attribute_key from AttributeMaster 
  where AttributeTypeId =@AttributeType and SegmentId=@SegmentId  
  order by AttributeID
end

```

I need to implement the `@AttributeTypeId` is 1 then different condition. `my@AttributeId` from `1 to 5`