Always raise with a pair or higher, fold with less than ace/king, and raise on ace/king if any of the following three rules apply.
Raise if the dealer's card is a 2 through queen and matches one of yours.
Raise if the dealer's card is an ace or king and you have a queen or jack in your hand.
Raise if the dealer's rank does not match any of yours and you have a queen in your hand and the dealer's card is less than your fourth highest card.