SQL SERVER – Query to Get the List of Logins Having System Admin (sysadmin) Permission

Though the script sounded simple to me, but I found that there are lots of incorrect scripts available on the internet. Here is the one of the script I found to find out the details of the system admin.