The upgrade guide can be found here: https://www.visualstudio.com/en-us/docs/setup-admin/tfs/upgrade/get-started What features do you have? e.g. reporting, SharePoint, project integrartion?
Thank you for posting here.
You need to in-place upgrade your SQL Server version from 2012 to 2016 before you upgrade the TFS2017. After that run the upgrade wizard in TFS, you could refer to the following link for more detailed information:
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.