How to output a response based on input


So for example, if I do:
puts "how are you?"
hi = gets.chomp

So how do I make it so that, for example, if the response is "bad", I can output a specific response like "aw, I'm sorry"?


Hi you could use a if statement like that

if hi  == "bad" 
    puts  "aw, I'm sorry"
    puts ....