Como te ha dicho el compañero, utilizando parámetros se soluciona, pero también puedes utilizar la función
QuotedStr, por ejemplo:
Código:
// busqueda exacta
sql.Add('select * from SUJETOS where APELLIDO = '+QuotedStr(trim(ape)));
// compenzando por
sql.Add('select * from SUJETOS where APELLIDO LIKE '+QuotedStr(trim(ape) + '%'));
// o conteniendo
sql.Add('select * from SUJETOS where APELLIDO LIKE '+QuotedStr('%' + trim(ape) + '%'));
Saludos