I need to select the result based on the column col1
value.
col1,col2
is text field type.
+-----+-----------+------+
| id | col1 | col2 |
+-----+-----------+------+
| 1 | 1200-1220 | XXX |
+-----+-----------+------+
| 2 | 1455-1460 | YYY |
+-----+-----------+------+
Example query:
SELECT col2 FROM TABLE_NAME WHERE col1 = 1215
Result i want:
'XXX'
How I get the above result.
If I inserted wrong, in which format I need to insert a row to get the result.
Please advise.