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

    Nov 18, 2025 · Within a SELECT statement, the CASE expression allows for values to be replaced in the result set based on comparison values. The following example uses the CASE …

  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 …

  3. SQL CASE Statement in WHERE Clause Examples - SQL Server Tips

    Oct 3, 2025 · Learn about different ways you can use a CASE statement in the WHERE clause for a T-SQL statement with these several examples.

  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

    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 …

  6. 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 …

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

    3 days ago · 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 …

  8. SQL Server CASE statement in WHERE clause

    In SQL Server, the CASE statement in the WHERE clause is a powerful tool that allows you to apply conditional logic to filter rows based on specified conditions. The CASE statement …

  9. CASE Statement in SQL Server

    Feb 12, 2024 · First, I will begin by explaining what a CASE statement is, and then you will understand the types of CASE statements in SQL Server. After that, you will understand the …

  10. 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 …