I believe I understand what you're asking.
First, you need to know how to add icons to a treeview. I'm not sure if you know how to do this or not as you have not posted any code. Please refer to
This Article[
^] for information.
Second, you're stating that you don't want to have a static image list, but a dynamic one. You'll have to download the icons from the DB and dynamically load them to your image list at run time. Manage which icon in the array belongs to each category and make them show up as per the article above.
If you want code to help with the solution, you'll have to update your question with code to reference against. Good luck!
Hogan