If I understand your question correctly, then yes you can use JS code within HTML file. If you have any column which contains user terms then you can use that to create conditional content
Thank you for your reply! I'm sorry, I didn't have enough explanation. It is not an HTML email. Is it impossible with text mail that is not HTML mail? Thank you.