I wanted to get the pointer to the database as data but I don't know how to do it.
How can I get the Data pointer back to main thread.

It's all in the videos :)

a) use global variable
b) use Queue argument for InitilizeSqlite function.
c) use Data argument for InitilizeSqlite function.

Casey uses c) point in HH. Look at Win32DoNextWorkQueueEntry function where he passes Entry.Data to Entry.Callback function pointer. For example, one of these function pointers will be doing asset loading from thread in LoadAssetWork function. It will use passed Data argument to figure out where what asset to load and where to store result that later can be used in main thread.