can I select columns based on their name in Mysql?
No, you can't, nor should you even consider it.
This is a variation on ...

Never use &quot;select *&quot; in Production Code

.. and the risk is the same.
At the moment, your table is nice and tidy, with a few columns of limited size.
At some point, someone is going have the &quot;Great Idea&quot; of adding a whole bunch of BLOB fields and populating them with terabytes of video data.  If you're unlucky and those new fields just happen to be prefixed &quot;GPS_&quot;, then your code would start retrieving these fields, even though it has absolutely no interest in them.
Always specify the fields that you want to retrieve explicitly.