Returns NULL if N is less than 1 or greater than the number of arguments.
ELT() is the complement of FIELD().
mysql>
mysql> SELECT ELT(1, 'A', 'B', 'C', 'D');
+----------------------------+
| ELT(1, 'A', 'B', 'C', 'D') |
+----------------------------+
| A |
+----------------------------+
1 row in set (0.00 sec)
mysql>
23.10.ELT |
| 23.10.1. | ELT(N,str1,str2,str3,...): Returns str1 if N = 1, str2 if N = 2, and so on |
| 23.10.2. | SELECT ELT(4, 'A', 'B', 'C', 'D'); |
| 23.10.3. | SELECT ELT(-1, 'A', 'B', 'C', 'D'); |
| 23.10.4. | SELECT ELT(10, 'A', 'B', 'C', 'D'); |
| 23.10.5. | Using ELT with data in a table |