A variant of this template will do what you want, using the ability of regular expressions to do an "or". Fix "ta" (I don't have all your columns). Also, I am not sure what column contains the Sci-Fi and Fantasy values. I assumed it was "tags".
Code:
program:
ta = 'aaa';
t = field('tags');
str_in_list(t, ',', 'Fiction',
in_list(t, ',', '^(Sci-Fi|Fantasy)$',
strcat('eBooks/sci-fi or fantasy/', ta),
strcat('eBooks/thriller/', ta)),
strcat('eBooks/Non-Fiction/', ta))