Hello Mohamed Helmi Bin Mohamed Idrus
Yes, Extended Security Updates (ESUs) can be applied to on-premises servers running Windows Server 2012 R2 and SQL Server 2012. ESUs are not limited to VMs in Azure environments.
Official Article Description:
However, please note that ESUs are only available for a limited time and are intended to provide additional security updates for customers who are unable to upgrade to a newer version of the product. It is recommended to upgrade to a supported version of Windows Server and SQL Server as soon as possible to ensure continued security and support.
More details please refer to this link: Product Lifecycle FAQ - Extended Security Updates | Microsoft Learn
Best Regards,
Hania Lian