The reason for your problem is that you are using column names as data. Your centiles need to go into a separate table. CREATE TABLE centiles (ID INTEGER PRIMARY KEY, cent TEXT); CREATE TABLE weights (ID INTEGER PRIMARY KEY, age INTEGER, WEIGHT INTEGER, CENT_ID INTEGER REFERENCES centiles(ID), UNIQUE(age,weight)); SELECT c.cent FROM weights w JOIN centiles c ON (c.ID = w.cent_id) WHERE w.age = 3 and w.weight = 9;