Are you aware that you can achieve the value of the selected option in selection field easily by writing the script like below in custom content?
However using this script; you will get the code value, but what if you want the caption value for the same? Well, you can do this by modifying your script as below.