how to Set Material from String variable ?

How to use the “Set Material” function starting from a material name from a String variable

for example the material name was BRK1 ,
From SQL database we are getting the the Material Name (Brk1) As string ,

Need to convert String variable to Set Material Function (Material Name) Param (Asset) .

Create a Map with String and Material, it can be done dynamically, too. You can then find the material by string:

Thank you for your suggestion