Skip to content

How to get column value by another column value?

I have table called my_table.

In my_table I have got 4 columns:

ID which is primary and auto increment, name, some_text, serial_number(int).

I want to get only those some_text fields which match with serial_number(int).

For example, if serial_number(int) value is ‘1’, I need to get all those some_text fields which are in the same row with serial_number(int) which values are ‘1’.