In SQL Server, what is the purpose of the CASE statement?
A. Filter rows based on a condition
B. Sort the result set
C. Combine rows into groups
D. Perform conditional logic in a query
The CASE statement is used to perform conditional logic in a query in SQL Server.