SQLite Query from unknown table based on known column value single query I'm working on a database to back up my online TCG. It's currently SQLite, but I'm going to transition it to a MySQL database later. Currently, I have three distinct types of cards with their own unique fields. For example. However, all cards have a single uniqueid that I use to refer to them. TABLE cards CARD ID as INT CARD TYPE as INT TYPE ID as INT TABLE creature cards CARD ID as INT TYPE ID as INT NAME as TEXT FLAVOR as TEXT ATTACK as INT DEFENSE as INT ELEMENT as INT FLAGS as INT MANA COST as TEXT TABLE spell cards CARD ID as INT TYPE ID as INT NAME as TEXT FLAVOR as TEXT SPELL TYPE as INT ELEMENT as INT MANA COST as TEXT TABLE mana cards CARD ID as INT TYPE ID as INT NAME as TEXT FLAVOR as TEXT ELEMENT as INT I'm trying to figure out how to build a query that will allow me to get all fields from a specific table without knowing the table I need to pull from ahead of time. Basically, I want to be able to supply CARD ID, query the cards table, and use the CARD TYPE and TYPE ID to return the row from creature cards where CARD TYPE is 1, spell cards where CARD TYPE is 2, and mana cards where CARD TYPE is 3. I'm currently doing this through two separate queries and doing the logic on the backend, but I'm wondering if there's a way to get the data all in one query, because my queries can be quite time consuming. Would it just be better to jam all card fields into one table, rather than keeping them in three separate tables?