Customization/visibility - checkbox and text field in the cases module

Hello,

We want to display text field in the cases module, when user checked the checkbox; so they can write a text value and save.

But, when someone uncheck it, then text field should get cleared, remove value from the db and hide that text fields for user.

Is it possible to achieve in the CRM? If yes, how to do this? Version 7.13

Thanks in advance!