You can pass the csv data along with the picked option, so later on you can then used the data to retreive the output.
here is an example.
[{"id":"b86f186e.375008","type":"inject","z":"1378ba83.90c825","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":410,"y":560,"wires":[["9c36a63e.ed4cd8"]]},{"id":"9c36a63e.ed4cd8","type":"template","z":"1378ba83.90c825","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"A,p1,c1,s1\nA,p2,c2,s2\nB,p3,c3,s3\nC,p4,c4,s4\nC,p5,c5,s5\n","output":"str","x":570,"y":560,"wires":[["2c9b985e.e5c3c"]]},{"id":"2c9b985e.e5c3c","type":"csv","z":"1378ba83.90c825","name":"","sep":",","hdrin":false,"hdrout":"all","multi":"mult","ret":"\\r\\n","temp":"","skip":"0","strings":false,"include_empty_strings":"","include_null_values":"","x":710,"y":560,"wires":[["b024df04.dddbd8"]]},{"id":"b024df04.dddbd8","type":"change","z":"1378ba83.90c825","name":"","rules":[{"t":"set","p":"options","pt":"msg","to":"$distinct($$.payload.col1).{\t \"Type \" & $: {\t \"o1\":$,\t \"data\":$$.payload\t }\t}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":880,"y":560,"wires":[["b39b85bc.5155d","5f8e252.3017e5c"]]},{"id":"b39b85bc.5155d","type":"ui_dropdown","z":"1378ba83.90c825","name":"","label":"","tooltip":"","place":"Select option","group":"6e33f3db.defabc","order":1,"width":0,"height":0,"passthru":false,"multiple":false,"options":[],"payload":"","topic":"","topicType":"str","x":430,"y":640,"wires":[["96f97e67.d78458"]]},{"id":"5f8e252.3017e5c","type":"debug","z":"1378ba83.90c825","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"options","targetType":"msg","statusVal":"","statusType":"auto","x":960,"y":640,"wires":[]},{"id":"96f97e67.d78458","type":"change","z":"1378ba83.90c825","name":"","rules":[{"t":"set","p":"options","pt":"msg","to":"[\t $$.payload.data[col1=$$.payload.o1].col2\t.{\t $: {\t \"o1\": $$.payload.o1,\t \"o2\": $,\t \"data\": $$.payload.data\t }\t}]","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":660,"y":640,"wires":[["5f8e252.3017e5c","3c9e55c9.f0d60a"]]},{"id":"3c9e55c9.f0d60a","type":"ui_dropdown","z":"1378ba83.90c825","name":"","label":"","tooltip":"","place":"Select option","group":"6e33f3db.defabc","order":0,"width":0,"height":0,"passthru":false,"multiple":false,"options":[],"payload":"","topic":"","topicType":"str","x":430,"y":720,"wires":[["8ce240ac.a5fad8"]]},{"id":"8ce240ac.a5fad8","type":"change","z":"1378ba83.90c825","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"$$.payload.data[\t col1=$$.payload.o1 and col2 = $$.payload.o2\t].col4","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":660,"y":720,"wires":[["4ca608a0.3d1d8"]]},{"id":"4ca608a0.3d1d8","type":"ui_text","z":"1378ba83.90c825","group":"6e33f3db.defabc","order":0,"width":0,"height":0,"name":"","label":"","format":"{{msg.payload}}","layout":"row-spread","x":820,"y":760,"wires":[]},{"id":"6e33f3db.defabc","type":"ui_group","name":"problems","tab":"8f03e639.85956","order":4,"disp":true,"width":"6","collapse":false},{"id":"8f03e639.85956","type":"ui_tab","name":"Home","icon":"dashboard","order":2,"disabled":false,"hidden":false}]