{"id":15501,"date":"2020-05-06T21:12:08","date_gmt":"2020-05-06T21:12:08","guid":{"rendered":"https:\/\/dbtut.com\/?p=15501"},"modified":"2020-05-06T21:12:55","modified_gmt":"2020-05-06T21:12:55","slug":"case-when-statement-in-mysql","status":"publish","type":"post","link":"https:\/\/dbtut.com\/index.php\/2020\/05\/06\/case-when-statement-in-mysql\/","title":{"rendered":"Case When Statement in MySQL"},"content":{"rendered":"<p>The article contains information about CASE WHEN Statement in MySQL as an alternative to the if condition.<\/p>\n<p>With the CASE statement used in MySQL as an alternative to the if function and if statement, desired commands can be executed according to a condition or value.<\/p>\n<h3>MYSQL Case When Statement<\/h3>\n<p>MySQL CASE WHEN statement is used to control situations where a value can take different values. It is also similar to the MySQL IF statement I mentioned in the <a href=\"https:\/\/dbtut.com\/index.php\/2020\/04\/21\/mysql-if-statement-and-mysql-if-function\/\" target=\"_blank\" rel=\"bookmark noopener noreferrer\">MySQL IF Statement and MySQL IF() Function<\/a> article.<\/p>\n<pre class=\"lang:default decode:true \">CASE CONDITION_VALUE\r\nWHEN CASE-1 THEN\r\n-- commands- 1\r\nWHEN CASE-2 THEN\r\n--  command- 2\r\nELSE\r\n-- command- N\r\nEND CASE;<\/pre>\n<p>Let&#8217;s perform the operations in article <a href=\"https:\/\/dbtut.com\/index.php\/2020\/04\/21\/mysql-if-statement-and-mysql-if-function\/\" target=\"_blank\" rel=\"noopener noreferrer\">MySQL IF Statement and MySQL IF() Function<\/a> using CASE WHEN.<\/p>\n<pre class=\"lang:default decode:true \">SELECT (CASE 5 &gt; 6\r\nWHEN FALSE THEN \"6 is bigger\"\r\nWHEN TRUE THEN \"5 is bigger\"\r\nEND) AS result;<\/pre>\n<p>Let&#8217;s use MySQL CASE WHEN statement according to the id column in the products table.<\/p>\n<pre class=\"lang:default decode:true\">SELECT *, (CASE id\r\nWHEN 1 THEN \"Computers\"\r\nWHEN 2 THEN \"Mobile Devices\"\r\nWHEN 3 THEN \"Elektronics\"\r\nELSE \"No Category\"\r\nEND) AS resut FROM products;<\/pre>\n<p>In the example, if the id value is 1, the result will be Computer, if it is 2, the result will be Mobile Devices, if it is 3, result will be Elektronics, and if it is another expression, it will return No Category.<\/p>\n<h3>Using CASE WHEN Statement in MySQL Stored Procedures<\/h3>\n<pre class=\"lang:default decode:true \">DELIMITER \/\/\r\nCREATE PROCEDURE FindNameSurname(IN mynumber INT, OUT myresult VARCHAR(50))\r\nBEGIN\r\n\r\nCASE mynumber\r\nWHEN 1 THEN\r\n  SET myresult = 'Yusuf';\r\nWHEN 2 THEN\r\n  SET myresult = 'SEZER';\r\nWHEN 3 THEN\r\n  SET myresult = 'Yusuf SEZER';\r\nELSE\r\n  SET myresult = 'Yusuf Sefa SEZER';\r\nEND CASE;\r\n\r\nEND\/\/\r\nDELIMITER ;<\/pre>\n<p>Lets execute the sp;<\/p>\n<pre class=\"lang:default decode:true \">SET @result= 0;\r\nCALL FindNameSurname(3, @result);\r\nSELECT @result;<\/pre>\n<p>When the stored procedure is executed, the value Yusuf Sefa SEZER will be assigned to the @result .<\/p>\n<p>The MySQL CASE WHEN statement also can be used as follows;<\/p>\n<pre class=\"lang:default decode:true \">SELECT *, (CASE\r\nWHEN id = 1 THEN \"Computers\" \r\nWHEN kat_id = 2 THEN \"Mobil Devices\"\r\nWHEN kat_id = 3 THEN \"Elektronics\"\r\nELSE \"No Category\"\r\nEND) AS result FROM prodcuts;<\/pre>\n<p>Have a good day.<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_15501\" class=\"pvc_stats all  \" data-element-id=\"15501\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/dbtut.com\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>The article contains information about CASE WHEN Statement in MySQL as an alternative to the if condition. With the CASE statement used in MySQL as an alternative to the if function and if statement, desired commands can be executed according to a condition or value. MYSQL Case When Statement MySQL CASE WHEN statement is used &hellip;<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_15501\" class=\"pvc_stats all  \" data-element-id=\"15501\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/dbtut.com\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":485,"featured_media":15502,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[7],"tags":[9558,9557,9546,9548,9559,9554,9553,9555,9556,9552,9551,9549,9550,9560,9547],"class_list":["post-15501","post","type-post","status-publish","format-standard","has-post-thumbnail","","category-mysql","tag-case-statement-in-mysql","tag-case-when-in-mysql","tag-case-when-statement-in-mysql","tag-case-when-statement-in-mysql-stored-procedures","tag-mysql-case-else-if","tag-mysql-case-statement-examples","tag-mysql-case-statement-in-stored-procedure","tag-mysql-case-statement-with-multiple-conditions","tag-mysql-case-when","tag-mysql-case-when-multiple-statements","tag-mysql-case-when-query","tag-mysql-case-when-statement","tag-mysql-case-when-statement-example","tag-mysql-select-case-when-else","tag-using-case-when-statement-in-mysql-stored-procedures"],"aioseo_notices":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Case When Statement in MySQL - Database Tutorials<\/title>\n<meta name=\"description\" content=\"Case When Statement in MySQL\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/dbtut.com\/index.php\/2020\/05\/06\/case-when-statement-in-mysql\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Case When Statement in MySQL - Database Tutorials\" \/>\n<meta property=\"og:description\" content=\"Case When Statement in MySQL\" \/>\n<meta property=\"og:url\" content=\"https:\/\/dbtut.com\/index.php\/2020\/05\/06\/case-when-statement-in-mysql\/\" \/>\n<meta property=\"og:site_name\" content=\"Database Tutorials\" \/>\n<meta property=\"article:published_time\" content=\"2020-05-06T21:12:08+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-05-06T21:12:55+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/05\/Ads\u0131z-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"951\" \/>\n\t<meta property=\"og:image:height\" content=\"449\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Yusuf SEZER\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Yusuf SEZER\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/05\/06\/case-when-statement-in-mysql\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/05\/06\/case-when-statement-in-mysql\/\"},\"author\":{\"name\":\"Yusuf SEZER\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/be8bf54494b6a89e626cbed2c940599a\"},\"headline\":\"Case When Statement in MySQL\",\"datePublished\":\"2020-05-06T21:12:08+00:00\",\"dateModified\":\"2020-05-06T21:12:55+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/05\/06\/case-when-statement-in-mysql\/\"},\"wordCount\":206,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/dbtut.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/05\/06\/case-when-statement-in-mysql\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/05\/Ads\u0131z-1.png\",\"keywords\":[\"CASE Statement in MySQL\",\"Case When in MySQL\",\"Case When Statement in MySQL\",\"CASE WHEN Statement in MySQL Stored Procedures\",\"Mysql case else if\",\"mysql case statement examples\",\"mysql case statement in stored procedure\",\"mysql case statement with multiple conditions\",\"MySQL CASE WHEN\",\"mysql case when multiple statements\",\"mysql case when query\",\"MySQL CASE WHEN statement\",\"mysql case when statement example\",\"Mysql select case when else\",\"Using CASE WHEN Statement in MySQL Stored Procedures\"],\"articleSection\":[\"MySQL-MariaDB\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/dbtut.com\/index.php\/2020\/05\/06\/case-when-statement-in-mysql\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/05\/06\/case-when-statement-in-mysql\/\",\"url\":\"https:\/\/dbtut.com\/index.php\/2020\/05\/06\/case-when-statement-in-mysql\/\",\"name\":\"Case When Statement in MySQL - Database Tutorials\",\"isPartOf\":{\"@id\":\"https:\/\/dbtut.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/05\/06\/case-when-statement-in-mysql\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/05\/06\/case-when-statement-in-mysql\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/05\/Ads\u0131z-1.png\",\"datePublished\":\"2020-05-06T21:12:08+00:00\",\"dateModified\":\"2020-05-06T21:12:55+00:00\",\"description\":\"Case When Statement in MySQL\",\"breadcrumb\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/05\/06\/case-when-statement-in-mysql\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/dbtut.com\/index.php\/2020\/05\/06\/case-when-statement-in-mysql\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/05\/06\/case-when-statement-in-mysql\/#primaryimage\",\"url\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/05\/Ads\u0131z-1.png\",\"contentUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/05\/Ads\u0131z-1.png\",\"width\":951,\"height\":449},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/05\/06\/case-when-statement-in-mysql\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/dbtut.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Case When Statement in MySQL\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/dbtut.com\/#website\",\"url\":\"https:\/\/dbtut.com\/\",\"name\":\"Database Tutorials\",\"description\":\"MSSQL, Oracle, PostgreSQL, MySQL, MariaDB, DB2, Sybase, Teradata, Big Data, NOSQL, MongoDB, Couchbase, Cassandra, Windows, Linux\",\"publisher\":{\"@id\":\"https:\/\/dbtut.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/dbtut.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/dbtut.com\/#organization\",\"name\":\"dbtut\",\"url\":\"https:\/\/dbtut.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg\",\"contentUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg\",\"width\":223,\"height\":36,\"caption\":\"dbtut\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/be8bf54494b6a89e626cbed2c940599a\",\"name\":\"Yusuf SEZER\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/19675b3db2d4ce370af047187123e2055a2b254ede3f0e7d9bc934da478146f7?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/19675b3db2d4ce370af047187123e2055a2b254ede3f0e7d9bc934da478146f7?s=96&d=mm&r=g\",\"caption\":\"Yusuf SEZER\"},\"url\":\"https:\/\/dbtut.com\/index.php\/author\/yusufsezer\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Case When Statement in MySQL - Database Tutorials","description":"Case When Statement in MySQL","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/dbtut.com\/index.php\/2020\/05\/06\/case-when-statement-in-mysql\/","og_locale":"en_US","og_type":"article","og_title":"Case When Statement in MySQL - Database Tutorials","og_description":"Case When Statement in MySQL","og_url":"https:\/\/dbtut.com\/index.php\/2020\/05\/06\/case-when-statement-in-mysql\/","og_site_name":"Database Tutorials","article_published_time":"2020-05-06T21:12:08+00:00","article_modified_time":"2020-05-06T21:12:55+00:00","og_image":[{"width":951,"height":449,"url":"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/05\/Ads\u0131z-1.png","type":"image\/png"}],"author":"Yusuf SEZER","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Yusuf SEZER","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/dbtut.com\/index.php\/2020\/05\/06\/case-when-statement-in-mysql\/#article","isPartOf":{"@id":"https:\/\/dbtut.com\/index.php\/2020\/05\/06\/case-when-statement-in-mysql\/"},"author":{"name":"Yusuf SEZER","@id":"https:\/\/dbtut.com\/#\/schema\/person\/be8bf54494b6a89e626cbed2c940599a"},"headline":"Case When Statement in MySQL","datePublished":"2020-05-06T21:12:08+00:00","dateModified":"2020-05-06T21:12:55+00:00","mainEntityOfPage":{"@id":"https:\/\/dbtut.com\/index.php\/2020\/05\/06\/case-when-statement-in-mysql\/"},"wordCount":206,"commentCount":0,"publisher":{"@id":"https:\/\/dbtut.com\/#organization"},"image":{"@id":"https:\/\/dbtut.com\/index.php\/2020\/05\/06\/case-when-statement-in-mysql\/#primaryimage"},"thumbnailUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/05\/Ads\u0131z-1.png","keywords":["CASE Statement in MySQL","Case When in MySQL","Case When Statement in MySQL","CASE WHEN Statement in MySQL Stored Procedures","Mysql case else if","mysql case statement examples","mysql case statement in stored procedure","mysql case statement with multiple conditions","MySQL CASE WHEN","mysql case when multiple statements","mysql case when query","MySQL CASE WHEN statement","mysql case when statement example","Mysql select case when else","Using CASE WHEN Statement in MySQL Stored Procedures"],"articleSection":["MySQL-MariaDB"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/dbtut.com\/index.php\/2020\/05\/06\/case-when-statement-in-mysql\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/dbtut.com\/index.php\/2020\/05\/06\/case-when-statement-in-mysql\/","url":"https:\/\/dbtut.com\/index.php\/2020\/05\/06\/case-when-statement-in-mysql\/","name":"Case When Statement in MySQL - Database Tutorials","isPartOf":{"@id":"https:\/\/dbtut.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/dbtut.com\/index.php\/2020\/05\/06\/case-when-statement-in-mysql\/#primaryimage"},"image":{"@id":"https:\/\/dbtut.com\/index.php\/2020\/05\/06\/case-when-statement-in-mysql\/#primaryimage"},"thumbnailUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/05\/Ads\u0131z-1.png","datePublished":"2020-05-06T21:12:08+00:00","dateModified":"2020-05-06T21:12:55+00:00","description":"Case When Statement in MySQL","breadcrumb":{"@id":"https:\/\/dbtut.com\/index.php\/2020\/05\/06\/case-when-statement-in-mysql\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/dbtut.com\/index.php\/2020\/05\/06\/case-when-statement-in-mysql\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/index.php\/2020\/05\/06\/case-when-statement-in-mysql\/#primaryimage","url":"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/05\/Ads\u0131z-1.png","contentUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/05\/Ads\u0131z-1.png","width":951,"height":449},{"@type":"BreadcrumbList","@id":"https:\/\/dbtut.com\/index.php\/2020\/05\/06\/case-when-statement-in-mysql\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/dbtut.com\/"},{"@type":"ListItem","position":2,"name":"Case When Statement in MySQL"}]},{"@type":"WebSite","@id":"https:\/\/dbtut.com\/#website","url":"https:\/\/dbtut.com\/","name":"Database Tutorials","description":"MSSQL, Oracle, PostgreSQL, MySQL, MariaDB, DB2, Sybase, Teradata, Big Data, NOSQL, MongoDB, Couchbase, Cassandra, Windows, Linux","publisher":{"@id":"https:\/\/dbtut.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/dbtut.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/dbtut.com\/#organization","name":"dbtut","url":"https:\/\/dbtut.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/#\/schema\/logo\/image\/","url":"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg","contentUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg","width":223,"height":36,"caption":"dbtut"},"image":{"@id":"https:\/\/dbtut.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/dbtut.com\/#\/schema\/person\/be8bf54494b6a89e626cbed2c940599a","name":"Yusuf SEZER","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/19675b3db2d4ce370af047187123e2055a2b254ede3f0e7d9bc934da478146f7?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/19675b3db2d4ce370af047187123e2055a2b254ede3f0e7d9bc934da478146f7?s=96&d=mm&r=g","caption":"Yusuf SEZER"},"url":"https:\/\/dbtut.com\/index.php\/author\/yusufsezer\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts\/15501","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/users\/485"}],"replies":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/comments?post=15501"}],"version-history":[{"count":0,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts\/15501\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/media\/15502"}],"wp:attachment":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/media?parent=15501"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/categories?post=15501"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/tags?post=15501"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}