If you don't need anything too fancy and it is for just one cell, then this formula will do. Just change the ranges to the correct sheet name/range and it will work for you. The formula gets the value selected from sheet 1 and checks if it matches Fruits or Vegetable. If it matches either of those then B3:B or C3:C is selected. I then constrain the array to only go as far as the count in B3:B...assuming that your two columns have the same number of elements. I then add this range to the data validation for C2 on Sheet one.
=Array_Constrain(ArrayFormula(if(Sheet1!B2="Fruit",B3:B,if(Sheet1!B2="Vegetable",C3:C,""))),countif(B3:B,"<>"),1)
Demo of the category and sub category

Showing each separate tab and what happens when something is selected.

If you are needing a dynamic subcategory for each row then the following onEdit script will set the data validation rules based on what was selected. This does require a small setup of creating the data validation for fruit and vegetable on Sheet2 D2 and E2.
function onEdit(e) {
var ss = e.source;
var value = e.value;
var activeSheet = ss.getSheetName();
var range = e.range;
var currentRow = range.getRow();
var currentColumn = range.getColumn();
if(activeSheet == 'Sheet1' && currentRow > 1 && currentColumn == 2 && value == 'Fruit') {
//IF THE ROW IS > 1 AND THE COLUMN = 2 AND FRUIT WAS SELECTED, THEN IT WILL COPY THE VALIDATION RULES FROM
//SHEET2 D2.
var fruitRule = ss.getSheetByName('Sheet2').getRange(2, 4).getDataValidation().copy();
range.offset(0,1).setDataValidation(fruitRule);
return;
} else if(activeSheet == 'Sheet1' && currentRow > 1 && currentColumn == 2 && value == 'Vegetable') {
//IF THE ROW IS > 1 AND THE COLUMN = 2 AND VEGETABLE WAS SELECTED, THEN IT WILL COPY THE VALIDATION RULES FROM
//SHEET2 E2.
var vegRule = ss.getSheetByName('Sheet2').getRange(2, 5).getDataValidation().copy();
range.offset(0,1).setDataValidation(vegRule);
return;
} else if(activeSheet == 'Sheet1' && currentRow > 1 && currentColumn == 2 && value == null) {
//IF THE ROW IS > 1 AND THE COLUMN = 2 AND VALUE WAS DELETED, THEN IT WILL CLEAR THE VALIDATION RULES
//FROM THE ADJACENT CELL.
range.offset(0,1).clearDataValidations();
}
}

Hope this helps! In the future, it would be much easier to show an example with a demo sheet provided.