Deleted previous answer.
To give the response, I think we need to know what you are wanting to happen. A parameter may not be appropriate, or it may be, but depends on you needs.
Let us know what you have initially, and what behaviour you are hoping for, and we can help you.
I avoided that because a dimension, "Food Name" already exists. So if I try to create a calculated field, and name it Food Name, I get, "A field name 'Food Name' already exists."
Just add a single blank space after Food Name
i.e. create a new field Food Name with a single blank space at the end. Tableau thinks it's a new field.
I'd avoid using the space trick - whilst fun, and an interesting loophole, I guarantee you will get confused over which is which.
What is the problem with the existing field? Are you effectively trying to replace values in the existing "Food Name" field?
If so, I'd recommend renaming the original one to "Food Name orig" and then call the new one "Food Name". This will avoid both the duplicate name issue, and the "confusing the heck out of you" issue
Maybe i missed something, but if the original requirement is to show all the rows in the Food Name Dimension according to the parameter selected, what you need would be something like;
Case [Select Food Category]
When "Fruit" if [Food Name] = "Apple" or [Food Name] = "Orange" then "Show" end
When "Vegetable" if [Food Name] = "Potato" or [Food Name] = "Onion" then "Show" end
else "Dont Show"
Bring [Food Name] in the View and this calculated field on the Filter shelf and select only "Show"