Help with If/Then Statements

Hello, I need some help with this code.

Here’s what I need done:

So where it says “Severe Weather Alert” it is going to have different text. I want it to be able to take that information from my database (I already figured that out)

Now, what I need is when it says “Severe Weather Alert”, I want the background color of the black bar to be red. When it says “Forecast Alert”, I want the color to be green and so on.

I don’t know how to import my database information into the if/then statements.

I know this may be confusing, but I can answer any questions you may have.

Thanks in advance!!

Caden