case when:参考:https://www.cnblogs.com/zqyanywn/p/5854079.html
decode参考:https://blog.csdn.net/sdut406/article/details/82795585