About 2,630,000 results
Open links in new tab
  1. CASE (Transact-SQL) - SQL Server | Microsoft Learn

    Nov 18, 2025 · CASE can be used in any statement or clause that allows a valid expression. For example, you can use CASE in statements such as SELECT, UPDATE, DELETE and SET, and in …

  2. 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.

  3. 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.

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

    Oct 7, 2025 · In this guide, we break down how to use the SQL CASE WHEN statement with multiple conditions across platforms like MySQL, SQL Server, Oracle, and PostgreSQL. By the end, you’ll …

  5. 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.

  6. Using CASE Statements in SQL SELECT Queries - Baeldung

    Nov 29, 2024 · CASE statements are a way to add if-then logic to SQL SELECT queries. They test conditions and return different values based on the results. This makes queries more flexible and …

  7. SQL Server CASE Expression - GeeksforGeeks

    Jul 23, 2025 · The CASE expression is used to show another column which can be evaluated based on the conditions depending on the existing columns. The CASE expression consists of WHEN and …

  8. SQL CASE Expression

    Summary: in this tutorial, you will learn how to use the SQL CASE expression to add if-else logic to the SQL statements. The CASE expression allows you to add if-else logic to queries, making them more …

  9. SQL SELECT IF...THEN: How to Implement Conditional Logic with CASE ...

    Dec 9, 2025 · While SQL lacks a native IF...THEN statement in the SELECT clause (unlike some programming languages), the CASE statement fills this gap, enabling powerful conditional logic …

  10. SQL Server: CASE Statement - TechOnTheNet

    This SQL Server tutorial explains how to use the SQL Server (Transact-SQL) CASE statement with syntax and examples. In SQL Server (Transact-SQL), the CASE statement has the functionality of an …