case-replace

case-replace is a variable defined in `replace.el'.
Its value is
t


Documentation:
Non-nil means `query-replace' should preserve case in replacements.

You can customize this variable.