Karen,
>But I suppose that must work with sqlexec command.
I'm not sure if I understand you correctly, but I'll try to give you an answer :)
You can do something like SELECT IIF(field1=1, "1", "2") AS field_name ... directly as a command in VFP to query a VFP table, but this should also work via the VFP ODBC driver against a VFP table.
Hope this answers your question. If not, just give me more details!
Armin