sadly Electrum does not have a way of decrypting an ecrypted private key in its import window as far as i know. you will have to decrypt it first and then import it in your Electrum wallet.
you can use a trusted tool like https://www.bitaddress.org to decrypt BIP38 encrypted private keys which is the most common way of encryption used. there are other tools for AES256-CBC encryption which is also common which you can use but i don't have any tools to suggest.
here is something you can test with:
BIP38 encrypted:
6PYSjZBVTLUZj9vkLFg7bzz3taZ6vGA4ma1AWBCeXfuVaLLq6hsty1QyZ4
123
compressed: L1GmmDzNMXb3ErekXcX5v2eLFP29SGWKZccT4hDyJqEiKa13cVHT
uncompressed: 5JjYSRhBjG5zbrmMHTAzJTCdXu7bzP6HSWpTJ9fHPAa1kimHPou