I have Mac mini (Late 2012) with macOS Sierra, and server with windows server 2012.
My question is: can I use this server for time machine?
Thanks
Yes, if you set up a share on your Windows server, tell the Mac it's ok to backup to non-Apple locations and prepare the share from the Mac.
Please see the following guide for details. It's not entirely straightforward but the shell script (referenced in the link) simplifies the process.