Unit LazVersion contains this:
const
...
laz_fullversion = ((laz_major * 100 + laz_minor) * 100 + laz_release) * 100 + laz_patch;
Therefore, you add LazVersion to "uses" and then you can against check Laz_FullVersion. For example, if you want to distingish whether the Lazarus version is 2.2.6 or newer then you can insert this:
uses ..., LazVersion, ...;
{$IF Laz_FullVersion >= 2020600}
// do this
{$ELSE}
// do that
{$ENDIF}
Note that the Laz_FullVersion is relatively new (can't remember the version in which it was introduced), in older versions you use unit LCLVersion and check against LCL_FullVersion.