Declaration
ELT(N, str1, str2, str3,...)
Description
Returns the index of the searched string.
If N=1, the return value is str1. If N=2, the return value is str2. This pattern continues. If N is less than 1 or greater than the number of parameters, the return value is NULL.
ELT() is the complement of FIELD().
Examples
obclient> SELECT ELT(3, 'abc1', 'abc2', 'abc', 'abc4', 'abc'), ELT(0, 'null1', NULL);
+----------------------------------------------+-----------------------+
| ELT(3, 'abc1', 'abc2', 'abc', 'abc4', 'abc') | ELT(0, 'NULL1', NULL) |
+----------------------------------------------+-----------------------+
| abc | NULL |
+----------------------------------------------+-----------------------+
1 row in set