I know it's not quite what you are after - but it might give you a starting point.
This flow sets a 'set' of dropdowns from an MQTT message.
I'm sure it can be adapted to accept an output from a dB.
[{"id":"e41067e6.0e18c8","type":"tab","label":"Set dropdown via MQTT ","disabled":false,"info":"","env":[]},{"id":"7ae33f1e.e621","type":"mqtt in","z":"e41067e6.0e18c8","name":"","topic":"mqtt/option/dropdown","qos":"0","datatype":"json","broker":"818a8500.e122b8","nl":false,"rap":false,"inputs":0,"x":280,"y":180,"wires":[["882ca384.63ba4"]]},{"id":"882ca384.63ba4","type":"change","z":"e41067e6.0e18c8","name":"","rules":[{"t":"move","p":"payload","pt":"msg","to":"options","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":510,"y":180,"wires":[["7c1ff520.5afc8c","38e66698.730a6a"]]},{"id":"7c1ff520.5afc8c","type":"ui_dropdown","z":"e41067e6.0e18c8","name":"","label":"","tooltip":"","place":"Select option","group":"2d4fe667.28f8ba","order":17,"width":0,"height":0,"passthru":true,"multiple":false,"options":[{"label":"","value":"","type":"str"}],"payload":"","topic":"topic","topicType":"msg","className":"","x":700,"y":240,"wires":[["430aa46b.7d2c9c"]]},{"id":"38e66698.730a6a","type":"debug","z":"e41067e6.0e18c8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"options","targetType":"msg","statusVal":"","statusType":"auto","x":710,"y":180,"wires":[]},{"id":"2ee35ba9.33de2c","type":"inject","z":"e41067e6.0e18c8","name":"option set 1","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"mqtt/option/dropdown","payload":"[{\"Choice 1\":\"1\"},{\"Choice 2\":\"2\"},{\"Choice 3\":\"3\"}]","payloadType":"json","x":310,"y":300,"wires":[["c365a7b9.3873a"]]},{"id":"43d6edb1.e5c1ac","type":"inject","z":"e41067e6.0e18c8","name":"option set 2","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"mqtt/option/dropdown","payload":"[{\"Choice 4\":\"4\"},{\"Choice 5\":\"5\"},{\"Choice 6\":\"6\"}]","payloadType":"json","x":310,"y":340,"wires":[["c365a7b9.3873a"]]},{"id":"c365a7b9.3873a","type":"mqtt out","z":"e41067e6.0e18c8","name":"","topic":"","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"818a8500.e122b8","x":470,"y":320,"wires":[]},{"id":"3d4c2855.43ab3","type":"comment","z":"e41067e6.0e18c8","name":"Setting dropdown options via MQTT","info":"","x":500,"y":120,"wires":[]},{"id":"1502d4ef.fe0b6b","type":"comment","z":"e41067e6.0e18c8","name":"Click to TEST","info":"","x":320,"y":260,"wires":[]},{"id":"430aa46b.7d2c9c","type":"debug","z":"e41067e6.0e18c8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":870,"y":240,"wires":[]},{"id":"818a8500.e122b8","type":"mqtt-broker","name":"Broker_152_Use_Me","broker":"192.168.1.152","port":"1883","clientid":"","autoConnect":true,"usetls":false,"compatmode":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"sessionExpiry":""},{"id":"2d4fe667.28f8ba","type":"ui_group","name":"demo","tab":"1caa8458.b17814","order":1,"disp":true,"width":"12","collapse":false},{"id":"1caa8458.b17814","type":"ui_tab","name":"Demo","icon":"dashboard","disabled":false,"hidden":false}]