The class Selenium Select has 3 methods of different option selection:
Now,
You can try a logic like this hope this helps
List optionsInnerText= driver.findElements(By.tagName("option"));
for(WebElement text: optionsInnerText){
String textContent = text.getAttribute("textContent");
if(textContent.toLowerCase.contains(expectedText.toLowerCase))
select.selectByPartOfVisibleText(expectedText);
}
}