query1.Open; Valor:= query1.fieldByName('ElCampoQueTeInterese').asString; query1.Close; if Valor = OtraVariable then HazLoQueSea;