---
title: "Discussion on \"What is Case statement in SQL and Is it same as IF/ELSE statement?\" | Hashnode"
description: "Discussion on \"What is Case statement in SQL and Is it same as IF/ELSE statement?\". Yes, it kind of is same as IF/ELSE statement but instead of writing IF/ELSE, we use WHEN, THEN and ELSE. I know it sounds different but trust me it pretty much has the same function and it all comes under the SQL CASE Statement.\nCASE returns records ..."
url: "https://hashnode.com/posts/what-is-case-statement-in-sql-and-is-it-same-as-ifelse-statement/62e508ca430bd1d04a840e5e"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [What is Case statement in SQL and Is it same as IF/ELSE statement?](https://abhishk.hashnode.dev/what-is-case-statement-in-sql-and-is-it-same-as-ifelse-statement?utm_source=hashnode&utm_medium=feed)

Yes, it kind of is same as IF/ELSE statement but instead of writing IF/ELSE, we use WHEN, THEN and ELSE. I know it sounds different but trust me it pretty much has the same function and it all comes under the SQL CASE Statement. CASE returns records ...

Jul 30, 2022 · 4 min read · abhishk.hashnode.dev  
Read the article

-   [#mysql](https://hashnode.com/tag/mysql)
-   [#databases](https://hashnode.com/tag/databases)
-   [#if-else](https://hashnode.com/tag/if-else)
-   [#query](https://hashnode.com/tag/query)
-   [#bigquery](https://hashnode.com/tag/bigquery)

## Written by

[Abhishek Kumar](https://hashnode.com/@abhishk)

@abhishk

  
[View profile](https://hashnode.com/@abhishk)

I'm definitely not a nerd, perhaps a geek who likes to tinker around with whatever tech I get my hands on. Figuring things out on my own gives me joy &amp; I don't use Arch :P

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
