Switch case to reference CSV data

Hello,

I want to use the Switch case to execute tests. This works fine for variables defined within the test. However, I want to make the switch statement execute based on values in the CSV data file.

switch (dataFromCsv) {

                 case variable1FromCsv ! =  "" :
                  //Executes Test
                 break;
                
                 case variable2FromCsv ! =  "" :
                 //Executes Test
                 break;

}

Any suggesstions on how to go about doing this?

Thanks in Advance