About 811,000 results
Open links in new tab
  1. SQL CASE Expression - W3Schools

    The CASE expression goes through conditions and returns a value when the first condition is met (like an if-then-else statement). So, once a condition is true, it will stop reading and return the result.

  2. CASE (Transact-SQL) - SQL Server | Microsoft Learn

    Nov 18, 2025 · Within a SELECT statement, a simple CASE expression allows for only an equality check; no other comparisons are made. The following example uses the CASE expression to change …

  3. SQL CASE Statement - GeeksforGeeks

    Dec 10, 2024 · In this article, we'll learn the SQL CASE statement in detail, with clear examples and use cases that show how to leverage this feature to improve your SQL queries.

  4. How to Use the CASE Statement in SQL (With Examples)

    Learn how to use the SQL `CASE` statement to implement conditional logic efficiently. Explore its syntax, use cases, best practices, and performance considerations.

  5. SQL CASE WHEN with Multiple Conditions – Syntax, Examples & Tips

    Oct 7, 2025 · By the end, you’ll know how to write and optimize case when in sql logic—including how to use a case statement with multiple conditions effectively in real-world queries.

  6. CASE Statement in SQL Examples - SQL Server Tips

    Apr 20, 2021 · This tip will teach you when and how you can use CASE in T-SQL statements with several code examples to give you a better understanding.

  7. SQL CASE Statement (With Examples) - Programiz

    The SQL CASE statement is used to check conditions and perform tasks on each row while selecting data. In this tutorial, you will learn about the SQL CASE statement with the help of examples.

  8. SQL CASE Examples with Multiple Conditions - Database.Guide

    Aug 20, 2024 · The CASE statement in SQL is a conditional statement that allows us to specify conditions and return different values based on whether those conditions are met.

  9. How to Use CASE statement in SQL: Explained with Examples

    Jun 28, 2023 · When working with SQL case statements, sometimes nesting case expressions becomes necessary for more complex query conditions. In this section, we’ll discuss how to nest SQL case …

  10. SQL Case Expression Syntax? - Stack Overflow

    Aug 7, 2008 · Search conditions for case expressions are similar to the search conditions in a where clause. Search conditions are detailed in the Transact-SQL User’s Guide.