I have a couple of open source projects on the go, one of which is a simple Delphi wrapper for SQLite. Lukas Gebauer has now added experimental support for user defined functions. This lets you in effect extend the SQL understood by SQLite to include your own custom functions, written in Delphi.
To try out the feature, download the wrapper and have a look at the file sqlite3udf.pas.